package com.dyh.service.serviceImpl;

import com.dyh.service.insService;
import com.dyh.po.institude;
import com.dyh.dao.insDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("insService")
@Transactional
public class insServiceImpl implements insService{
    @Autowired
    insDao insdao;


    @Override
    public List<institude> findAllInst() {
        return insdao.findAllInst();
    }

    @Override
    public int addInst(String instid,String instname,String instlevel,String instfather,String areaid) {
        return insdao.addInst(instid,instname,instlevel,instfather,areaid);
    }

    @Override
    public institude findInstByName(String instName) {
        return insdao.findInstByName(instName);
    }

    @Override
    public int editInst(Long id, String instname, String areaid) {
        return insdao.editInst(id,instname,areaid);
    }

    @Override
    public int deleteInst(Long id) {
        return insdao.deleteInst(id);
    }
}
